<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/4/26
  Time: 15:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../../common/web_top.jsp" %>
<title>合同编号管理</title>
<div ng-include="loanIng" class="includeStyle ">
    <div class="bgSortScroll">
        <!-- ngIf: HbHr.hr322 -->
        <div class="public-bgContent " ng-if="HbHr.hr322">
            <div class="public-bgDate">
		<span>
			<input type="text" autocomplete="off" id="start_time" ng-model="param.start_time" ng-focus="remHight()"
                   ng-class="{'error':redErr.dateTime}" placeholder="开始时间"
                   class="ng-pristine ng-untouched ng-valid ng-empty datepicker">
			<i class="iconfont icon-riqi"></i>
		</span>
                <em>
                    ~
                </em>
                <span>
			<input type="text" autocomplete="off" id="end_time" ng-model="param.end_time" ng-focus="remHight()"
                   ng-class="{'error':redErr.dateTime}" placeholder="结束时间"
                   class="ng-pristine ng-untouched ng-valid ng-empty datepicker">
			<i class="iconfont icon-riqi"></i>
		</span>
                <div class="se-re">
                    <select id="seleNames" ng-model="param.type" ng-class="{'error':redErr.seleName}"
                            ng-focus="remHight()" ng-change="changeName()"
                            class="ng-pristine ng-untouched ng-valid ng-empty">
                        <option value="" selected="selected">选择字段</option>
                        <option value="1">借款编号</option>
                        <option value="2">身份证号码</option>
                        <option value="3">手机号码</option>
                        <option value="4">客户姓名</option>
                        <option value="5">业务员姓名</option>
                    </select>
                    <span class="se-po"></span>
                </div>
                <span>
			<input type="text" autocomplete="off" id="inputNames" placeholder="请输入关键字" ng-focus="remHight()"
                   ng-model="param.name"
                   class="ng-pristine ng-untouched ng-valid ng-empty">
		</span>
                <div class="se-re">
                    <select id="contractStatus" ng-model="param.status"
                            class="ng-pristine ng-untouched ng-valid ng-empty">
                        <option value="" selected="selected">状态</option>
                        <option value="1">有效</option>
                        <option value="2">无效</option>
                    </select>
                    <span class="se-po"></span>
                </div>

                <!--<select ng-options="b.id as b.name for b in buMen.content" ng-model="data.departmentId" ng-change="seltt()">
                    <option value="">部门</option>
                </select>
                <select ng-options="c.id as c.realName for c in zhiWei.content" ng-model="data.roleId">
                    <option value="">业务员</option>
                </select>-->
                <button id="contract_serach">
                    <i class="iconfont icon-sousuo"></i>
                </button>
            </div>
            <!--提示操作-->

            <div class="public-bghint">
                <span ng-click="show()" style="cursor: pointer;">提示操作</span>
                <i class="iconfont icon-icon-copy-copy"></i>
                <span class="calNum">筛选<span class="" id="total">{{content.total}}</span>条结果</span>
            </div>
            <ul class="public-ulList set-listH" ng-show="loanIngShow">
                <li>显示拥有该栏目管理权限的数据；</li>
                <li>拥有权限的管理员会显示对应的操作按钮；</li>
                <li>业务员进入只允许查看自己关联的客户。</li>
            </ul>
            <div style="height: 20px;"></div>
            <div class="table-scroll">
                <!--tabel 列表-->
                <table class="table public-table PoInput numMang-table">
                    <thead>
                    <tr>
                        <td>选择</td>
                        <td>生成时间</td>
                        <td>合同编号</td>
                        <td>关联的借款编号</td>
                        <td>状态</td>
                        <td>操作人员</td>
                        <td>操作</td>
                    </tr>
                    </thead>
                    <tbody id="contract_num_management">

                    </tbody>
                    <tfoot class="public-botPage">
                    <tr>
                        <td>
                            <!-- 全选反选  -->
                            <input type="checkbox" class="all_checked" ng-click="F.ch_id_all($event,'ch_id')">
                        </td>
                        <td colspan="7">
                            <div class="public-botPage-left">
							<span>
								<span>全选</span>
							</span>
                                <div class="se-re">
                                    <select class="supportcon ng-pristine ng-untouched ng-valid ng-not-empty all_invalid_num"
                                            ng-model="selectType.default"
                                            ng-change="F.selectQuery('supportcon','ch_id')">
                                        <option value="-1" selected="selected">批量操作</option>
                                        <!-- ngIf: HbHr.hr324 -->


                                        <option ng-if="HbHr.hr324" value="1" path="loanIng" params="beBad"
                                                param="type:2" class="">作废编号
                                        </option><!-- end ngIf: HbHr.hr324 -->
                                        <option ng-if="HbHr.hr324" value="2" path="loanIng" params="beBad"
                                                param="type:2" class="">恢复编号
                                        </option><!-- end ngIf: HbHr.hr324 -->
                                    </select>
                                    <span class="se-po"></span>
                                </div>
                                <!-- <button ng-if="HbHr.hr325" class="tabHint newcontract" ng-click="btnQuery('newcontract')" path="loanIng" params="blank" data-type="2" param="type:1">
                                新增合同编号
                                </button> -->
                                <!-- ngIf: HbHr.hr325 -->
                                <script id="special_fourth_tpl" type="x-handlebars-template">
                                    {{#each .}}
                                    {{#IF_EQ key 'addContractNum'}}
                                    <button id="addList"
                                            class="new_contract_num tabHint newcontract">
                                        新增合同编号
                                    </button><!-- end ngIf: HbHr.hr325 -->
                                    {{/IF_EQ}}
                                    {{/each}}
                                </script>
                            </div>
                            <div class="page-container contract-page-container"
                                 style="float: right; padding: 15px 30px;"></div>
                        </td>
                    </tr>
                    </tfoot>
                </table>
            </div>
        </div><!-- end ngIf: HbHr.hr322 -->
    </div>
</div>
<%--作废编号--%>
<div class="winBox invalid_num_winBox" style="display: none;">
    <!-- 加载弹窗盒子容器 -->
    <!-- ngInclude: box -->
    <div class="winBox1 " ng-include="box"><!-- 说明：弹窗 -->
        <div class="winBox6 ">
            <div class="lotsload">
                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">作废编号</span>
                    <i class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
                </div>
                <!-- 内容 -->
                <div class="deleBox">
                    <!-- 底部 -->
                    <div class="deleteTit">
                        <span class="first"><i class="iconfont icon-tips2"></i></span>
                        <span>您确定要作废编号？</span>
                    </div>
                    <div class="deleFooter" style="padding: 0;">
                        <div class="deleBtn">
                            <button id="commit_invalid" ng-click="queding()"
                                    style="margin: 0;margin-bottom: 30px;margin-left: 68px;">确认提交
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<%--恢复编号--%>
<div class="winBox valid_num_winBox" style="display: none;">
    <!-- 加载弹窗盒子容器 -->
    <!-- ngInclude: box -->
    <div class="winBox1 " ng-include="box"><!-- 说明：弹窗 -->
        <div class="winBox6 ">
            <div class="lotsload">
                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">恢复编号</span>
                    <i class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
                </div>
                <!-- 内容 -->
                <div class="deleBox">
                    <!-- 底部 -->
                    <div class="deleteTit">
                        <span class="first"><i class="iconfont icon-tips2"></i></span>
                        <span>您确定要恢复编号？</span>
                    </div>
                    <div class="deleFooter" style="padding: 0;">
                        <div class="deleBtn">
                            <button id="commit_valid" ng-click="queding()"
                                    style="margin: 0;margin-bottom: 30px;margin-left: 68px;">确认提交
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script id="contract_num_management_tpl" type="x-handlebars-template">

    {{#if content.content.list}}

    {{#each content.content.list}}
    <tr ng-repeat="i in data1.content.list" ng-click="F.tabClick($event)"
        class="table-tr-hover ">
        <td><input type="checkbox" name="ch_id" value="{{id}}" data-status="{{status}}"></td>
        <td class="">{{add_time}}</td>
        <td class="">{{contract_no}}</td>
        <td class="">{{loan_number}}</td>
        <!-- ngIf: i.status=='1' -->
        <td ng-if="i.status=='1'" class="">

            {{#state status 1}}
            有效
            {{/state}}
            {{#state status 2}}
            无效
            {{/state}}
        </td>
        <!-- end ngIf: i.status=='1' -->
        <!-- ngIf: i.status=='2' -->
        <td class="">{{real_name}}</td>
        <td>
            <div class="se-re sel-blue">
                <select ng-click="F.stopPropagation($event)" data-id="{{id}}" data-oid="{{oid}}"
                        data-pid="{{product_id}}"
                        data-status="{{status}}"
                        class="tabHint client163 ng-not-empty invalid_num_select" ng-model="selectType.default"
                        ng-change="F.selectQuery('client163')">
                    <option value="-1" selected="selected">选择操作</option>
                    <!-- ngIf: HbHr.hr323 && i.loan_number!=null -->
                    <!-- ngIf: HbHr.hr324 && i.loan_number==null && i.status=='1' -->


                    {{#each ../fourthMenus}}
                    {{../status}}
                    {{../loan_number}}
                    <option value="{{key}}" {{#state key
                    'relatedOrder'}}
                    {{#state ../../status 1}}
                    {{#if ../../../loan_number}}
                    {{else}}style="display:none"
                    {{/if}}
                    {{else}}style="display:none"
                    {{/state}}
                    {{/state}} {{#state key 'noNo'}}{{#state ../../status 1}}{{#if
                    ../../../loan_number}}style="display:none"{{else}}{{/if}}{{else}}style="display:none"{{/state}}{{/state}}
                    {{#state key 'recoverNo'}}{{#state ../../status 2}}{{#if
                    ../../../loan_number}}style="display:none"{{else}}{{/if}}{{else}}style="display:none"{{/state}}{{/state}}
                    {{#IF_EQ key 'addContractNum'}}style="display:none"{{/IF_EQ}}
                    >{{name}}
                    </option>
                    {{/each}}
                    <%--{{#state status 1}}
                    {{#if loan_number}}
                    <option ng-if="HbHr.hr324 &amp;&amp; i.loan_number==null &amp;&amp; i.status=='1'"
                            value="associated" path="loanIng" params="beBad" data-type="2"
                            param="id:163,type:1" class="">关联订单
                    </option>
                    {{else}}
                    <option data-id="{{id}}"  ng-if="HbHr.hr324 &amp;&amp; i.loan_number==null &amp;&amp; i.status=='1'"
                            value="invalid" path="loanIng" params="beBad" data-type="2"
                            param="id:163,type:1" class="">作废编号
                    </option>

                    {{/if}}
                    {{/state}}
                    {{#state status 2}}
                    {{#if loan_number}}

                    {{/if}}
                    {{/state}}--%>


                    <!-- end ngIf: HbHr.hr324 && i.loan_number==null && i.status=='1' -->
                </select>
                <span class="se-po-blue"></span>
            </div>
        </td>
    </tr>
    {{/each}}

    {{else}}
    <tr ng-if="data.content.list.length ==0" class="">
        <td colspan="16">暂时找不到数据</td>
    </tr>
    {{/if}}
</script>
<script type="text/javascript" src="static/js/jquery-plugin/jpager.js?_v=190102162154"></script>
<script type="text/javascript" src="static/js/page/loanIng/contract_num_manager.js?_v=190102162154"></script>

<%@include file="../../common/web_bottom.jsp" %>

